
arr = [1,2,3,4,5]
vec = []
result = 0
n = 5
for i in range(n):
    tmp = arr[i]
    result += tmp
    vec.append(result)

range_list = []

for a,b in [
    (0,1),
    (1,3),
]:
    if a ==0:
        print(vec[b])
    else:
        print(vec[b]-vec[a-1])

